﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.WebApiTool
{
    public class DData
    {
        public List<DModule> ModuleList { get; set; }

        public DData()
        {
            ModuleList = new List<DModule>();
        }

        /// <summary>
        /// 排序
        /// </summary>
        public void Sort()
        {
            ModuleList = ModuleList.OrderBy(p => p.Name).ToList();

            foreach (var module in ModuleList)
            {
                module.ScenarioList = module.ScenarioList.OrderBy(p => p.Name).ToList();
                foreach (var scenario in  module.ScenarioList)
                {
                    scenario.Actions = scenario.Actions.OrderBy(p => p.Name).ToList();
                }
            }
        }
    }
}
